package com.zenithmind.library.pojo.query;

import com.zenithmind.common.query.BaseQuery;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;

/**
 * 借阅记录查询条件
 *
 * @author ZenithMind
 * @since 2024-06-14
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(name = "借阅记录查询条件", description = "借阅记录查询的条件参数")
public class BorrowRecordQuery extends BaseQuery {

    @Schema(description = "用户ID", example = "1")
    private String userId;

    @Schema(description = "用户姓名", example = "张三")
    private String userName;

    @Schema(description = "用户学号/工号", example = "20240001")
    private String userNumber;

    @Schema(description = "图书ID", example = "1")
    private String bookId;

    @Schema(description = "图书标题", example = "Java编程思想")
    private String bookTitle;

    @Schema(description = "图书ISBN", example = "9787111213826")
    private String bookIsbn;

    @Schema(description = "条形码", example = "BC001")
    private String barcode;

    @Schema(description = "借阅状态 (0-借阅中, 1-已归还, 2-逾期, 3-已续借, 4-丢失, 5-损坏)", example = "0")
    private Integer status;

    @Schema(description = "借阅开始日期", example = "2024-01-01")
    private LocalDate borrowStartDate;

    @Schema(description = "借阅结束日期", example = "2024-12-31")
    private LocalDate borrowEndDate;

    @Schema(description = "应还开始日期", example = "2024-01-01")
    private LocalDate dueStartDate;

    @Schema(description = "应还结束日期", example = "2024-12-31")
    private LocalDate dueEndDate;

    @Schema(description = "归还开始日期", example = "2024-01-01")
    private LocalDate returnStartDate;

    @Schema(description = "归还结束日期", example = "2024-12-31")
    private LocalDate returnEndDate;

    @Schema(description = "是否逾期 (0-否, 1-是)", example = "1")
    private Integer isOverdue;

    @Schema(description = "是否有罚金 (0-否, 1-是)", example = "1")
    private Integer hasFine;

    @Schema(description = "罚金支付状态 (0-未支付, 1-已支付)", example = "0")
    private Integer finePaid;

    @Schema(description = "最小逾期天数", example = "1")
    private Integer minOverdueDays;

    @Schema(description = "最大逾期天数", example = "30")
    private Integer maxOverdueDays;

    @Schema(description = "借阅操作员ID", example = "admin")
    private String borrowOperatorId;

    @Schema(description = "归还操作员ID", example = "admin")
    private String returnOperatorId;

    @Schema(description = "排序字段", example = "borrowDate")
    private String sortField;

    @Schema(description = "排序方向 (asc/desc)", example = "desc")
    private String sortOrder;
}
